package com.lp.business.model;

import java.math.BigDecimal;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.iframework.support.spring.hibernate.model.BaseHibernateModelSupport;

/**
 * 消费信息模型
 * 
 * @author lp
 * @date 2018-08-08 18:23:41
 */
@Entity
@Table(name = "cost")
@org.hibernate.annotations.Table(appliesTo = "cost", comment = "消费信息模型")
public class Cost extends BaseHibernateModelSupport {
	private static final long serialVersionUID = 1L;
	
	/** 摘要 */
	@Column(columnDefinition = "varchar(32)  comment '摘要'")
	private String summary;
	
	/** 消费行业Id */
	@Column(columnDefinition = "varchar(32)  comment '消费行业Id'")
	private String industryId;
	
	/** 消费行业 */
	@ManyToOne(cascade = { CascadeType.MERGE }, fetch = FetchType.LAZY)
	@JoinColumn(name = "industryId", nullable = true, insertable = false, updatable = false)
	private Industry industry;
	
	/** 消费报告Id */
	@Column(columnDefinition = "varchar(32)  comment '消费报告Id'")
	private String reportId;
	
	/** 消费报告 */
	@ManyToOne(cascade = { CascadeType.MERGE }, fetch = FetchType.LAZY)
	@JoinColumn(name = "reportId", nullable = true, insertable = false, updatable = false)
	private Report report;
	
	/** 消费人Id */
	@Column(columnDefinition = "varchar(32)  comment '消费人Id'")
	private String memberId;
	
	/** 消费人 */
	@ManyToOne(cascade = { CascadeType.MERGE }, fetch = FetchType.LAZY)
	@JoinColumn(name = "memberId", nullable = true, insertable = false, updatable = false)
	private Member member;
	
	/** 消费费用 */
	@Column(columnDefinition = "DECIMAL(20,2) comment '消费费用'")
	private BigDecimal cost;

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getIndustryId() {
		return industryId;
	}

	public void setIndustryId(String industryId) {
		this.industryId = industryId;
	}
	
	public Industry getIndustry() {
		return industry;
	}

	public void setIndustry(Industry industry) {
		this.industry = industry;
	}

	public String getReportId() {
		return reportId;
	}

	public void setReportId(String reportId) {
		this.reportId = reportId;
	}


	public Report getReport() {
		return report;
	}

	public void setReport(Report report) {
		this.report = report;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

}
